﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DanhSachMaBenhICD.aspx.cs" Inherits="HospitalManager.QuanLyTiepNhan.TiepNhanBenhNhan.DanhSachMaBenhICD" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Mã bệnh ICD</title>
    <link href="/Templates/css/bootstrap.css" rel="stylesheet" />
    <link href="/Templates/css/bootstrap-table.css" rel="stylesheet" />
    <link href="/Templates/css/customize.css" rel="stylesheet" />
    <script src="/Templates/js/jquery-1.11.1.min.js"></script>
    <script src="/Templates/js/bootstrap.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="col-xs-12 col-md-12">
            <div class="row" style="margin-top: 10px;">
                <div class="form-horizontal">
                    <div class="col-xs-6 col-md-6">
                        <div class="form-group">
                            <label for="txtMaBenh" class="col-sm-3 control-label">
                                Mã bệnh</label>
                            <div class="col-sm-9">
                                <asp:TextBox ID="txtMaBenh" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-2 col-md-2">
                        <asp:LinkButton ID="btnTimKiem" CssClass="btn btn-info" runat="server" OnClick="btnTimKiem_Click">Tìm kiếm</asp:LinkButton>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <asp:GridView ID="gvDanhMuc" runat="server" AutoGenerateColumns="False" Width="100%"
                            CssClass="table table-bordered table-condensed"
                            DataKeyNames="MaBenh">
                            <Columns>
                                <asp:BoundField DataField="RowNumber" HeaderText="STT">
                                    <ItemStyle HorizontalAlign="Right" Width="5%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="MaBenh" HeaderText="Mã bệnh">
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField DataField="TenBenhTiengViet" HeaderText="Tên bệnh tiếng việt"></asp:BoundField>
                                <asp:BoundField DataField="TenBenhTiengAnh" HeaderText="Tên bệnh tiếng anh"></asp:BoundField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="btnChon" runat="server" ToolTip="Chọn bệnh" CssClass="btn btn-info btn-sm"
                                            mabenh='<%# Eval("MaBenh") %>' tenbenh='<%# Eval("TenBenhTiengViet") %>' 
                                            OnClientClick="chonbenhicd(this.id)" href="javascript:void(0)" >
                                        <i class="glyphicon glyphicon-check"></i>
                                        </asp:LinkButton>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                </div>
                <div class="col-md-6" style="text-align: right;">
                    <asp:DataList RepeatDirection="Horizontal" runat="server" ID="dlPager" OnItemCommand="dlPager_ItemCommand"
                        CssClass="tbPage">
                        <ItemTemplate>
                            <asp:LinkButton Enabled='<%#Eval("Enabled") %>' runat="server" ID="lnkPageNo" Text='<%#Eval("Text") %>'
                                CommandArgument='<%#Eval("Value") %>' CommandName="PageNo"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:DataList>
                </div>
            </div>
        </div>
        <asp:HiddenField ID="hfPageIndex" runat="server" Value="1" />
    </form>
    <script type="text/javascript">
        function chonbenhicd(controlId) {
            if (window.opener != null && !window.opener.closed) {
                var txtMaBenh = window.opener.document.getElementById("txtMaBenh");
                txtMaBenh.value = $("#" + controlId).attr("mabenh");
            }
            window.close();
        }
    </script>
</body>
</html>
